<!-- 会员中心主内容区 -->
<div class="page-article">
  <!-- 修改密码 -->
  <div class="member_welhead"><ins></ins><b><{t}>修改密码<{/t}></b> </div>
  <div id="member_changepass" class="member-changepass member-mod">
    <form action="<{link app=b2c ctl='site_member' full='1' act='save_security'}>" method="post" class="mod-content signupin-content">

        <{if !($is_nopassword == 'true') }>
		<div class="form-group">
          <label for=""><{t}>旧密码<{/t}>：</label>
		  <input type="password" name="old_passwd" id="" class="form-control x-input" maxlength="20" autofocus="autofocus" vtype="required" data-caution="<{t}>请填写旧密码<{/t}>">
		</div>
        <{/if}>
		<div class="form-group">
          <label for=""><{t}>新密码<{/t}>：</label>
		  <input type="password" name="passwd" class="form-control x-input auto-password-check-handle" maxlength="20" placeholder="<{t}>6-20个字符<{/t}>" vtype="required&&minLength:6&&maxLength:20" data-equal="pam_account[psw_confirm]" data-caution="<{t}>请填写新密码，6-20个字符&&输入不正确，最少6个字符&&输入不正确，最多20个字符<{/t}>"><span class="password-check"><em class="poor"><{t}>差<{/t}></em><em class="weak"><{t}>弱<{/t}></em><em class="good"><{t}>中<{/t}></em><em class="strong"><{t}>强<{/t}></em><span class="progress"><span class="percent"></span></span></span><span class="validation-messagebox"></span>
		</div>
		<div class="form-group">
          <label for=""><{t}>确认新密码<{/t}>：</label>
		  <input type="password" name="passwd_re" id="" class="form-control x-input" maxlength="20" vtype="equal:passwd" data-caution="<{t}>两次密码输入不相符，请重新输入<{/t}>"><span class="validation-messagebox"></span>
		</div>
		<div class="form-group">
		   <label for=""></label>
		   <button type="submit" class="btn btn-primary action-confirm pull-right" rel="_request"><span><span><{t}>确 定<{/t}></span></span></button>
		   <div class="clearfix"></div>
		</div>	
    </form>
  </div>
</div>

<script>
$('member_changepass').getElement('.action-confirm').store('_ajax_config', {
    progress: function(rs) {
        var type = ['success','error'], i = type.length;
        for(;i --;) {
            var v = type[i], msg = v === 'success' ? rs[v]  + '<br><b><{t}>系统将转向登录页面，请用新密码登录！<{/t}></b>' : rs[v];
            if(!msg) continue;
            return Message(msg, v, callback);
        }
        function callback() {
            if(rs.redirect) location.href = rs.redirect;
        }
    }
});
</script>
